package com.taldh.apache.jmeter.ctrl;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@RestController
@RequestMapping("/hash/map")
public class HashMapTestController {

    public static HashMap<String, String> map = new HashMap<>(100000);

    static {
        for (int i = 0; i < 100000; i++) {
            map.put(""+i,"value"+i);
        }
    }

    @GetMapping("/get/{key}")
    public String getValueByKey(@PathVariable("key") String key) {
        return map.get(key);
    }

}
